import React from 'react';
import { connect } from 'dva';
import CommonList from '../../components/Common/CommonList';

function commonList({
  dispatch, app, content, fastFilter,
}) {
  const commonListProps = {
    app,
    content,
    fastFilter,
    dispatch,
    onAddPane: getAddPane, /* 增加标签 */
  };
  function getAddPane(pane) {
    /* 增加标签 */
    dispatch({ type: 'app/addPane', payload: { pane } });
  }
  return (
    <CommonList {...commonListProps} />
  );
}

export default connect(({ app, content, fastFilter }) =>
  ({ app, content, fastFilter }))(commonList);
